FROM python:2.7.18-slim-buster
COPY ./ /app
WORKDIR /app
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list && \
    apt update && \
    apt install -y gcc git libmagic-dev && \
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --upgrade pip && \
    pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt
RUN chmod +x /app/datainit.sh
ENV APP_ID="bk_sops"\
    APP_TOKEN="123"\
    BK_PAAS_HOST=""\
    BK_CC_HOST=""\
    BK_JOB_HOST=""
ENTRYPOINT ["python", "manage.py"]
